# $Id: PKGBUILD 88098 2013-04-11 14:07:15Z bpiotrowski $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>

pkgname=catfish
pkgver=0.6.3
pkgrel=1
pkgdesc='Versatile file searching tool'
arch=('any')
url='https://launchpad.net/catfish-search'
license=('GPL')
install=$pkgname.install 
depends=('gtk3' 'python-gobject' 'pyxdg' 'xdg-utils' 'hicolor-icon-theme')
makedepends=('intltool')
optdepends=('zeitgeist: Zeitgeist integration'
            'findutils: filename search'
            'locate:    filename search'
            'tracker:   fulltext search'
            'strigi:    fulltext search'
            'pinot:     fulltext search')
source=(https://launchpad.net/$pkgname-search/0.6/$pkgver/+download/$pkgname-$pkgver.tar.bz2)
md5sums=('4fd496c55d9dce64f555074c478cc4dd')

build() {
  cd $srcdir/$pkgname-$pkgver

  ./configure --prefix=/usr

  # Correct symlinks
  sed -i 's|ln -sf $(DESTDIR)/$(PREFIX)/share|ln -sf ..|' Makefile
  make
}

package () {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install

  install -d $pkgdir/usr/share/pixmaps
  ln -s /usr/share/icons/hicolor/scalable/apps/$pkgname.svg $pkgdir/usr/share/pixmaps/$pkgname.svg
}
